// 权限问题后期增加
import { get, post } from '/@/utils/http/axios'
import { BannerState } from '/@/store/modules/homePage/types'

enum URL { 
  getVerifyCode = '/api/student/commonlogingetvcode/', // 获取验证码
  loginByPhone = '/api/student/commonloginbyphone/', //  手机登录
  loginByPassword = '/api/student/commonlogin/', // 账密登录

  logout = '/api/student/logout/', 

  register = '/api/student/commonregister/', // 手机号注册
  registerStep2 = '/api/student/commonsetpassword/', // 注册 步骤2 设置用户名密码
}

/// 课程列表
const getVerifyCode = async (data) => post<any>({url :URL.getVerifyCode, data });
const loginByPhone =  async (data) => post<any>({url :URL.loginByPhone, data });
const loginByPassword = async (data) => post<any>({url :URL.loginByPassword, data });

const logout = async (data) => post<any>({url :URL.logout, data });

const register = async (data) => post<any>({url :URL.register, data });
const registerStep2 = async (data) => post<any>({url :URL.registerStep2, data });

export { 
  getVerifyCode, loginByPhone, loginByPassword, 
  logout, 
  register, registerStep2 
}